- /* sxcbmpi.cpp by K.Tsuru */
- // function ID 5104 BRADIX
- /*********************
- SDecimal class
- pi by Machin's formula
- **********************/
- #ifndef SN_H
- #include "sn.h"
- #endif
-
- SDecimal BMachinPi(){
- SDecimal bpi, bpi2;
-
- bpi = Batan2(1, 5); // bpi = atan(1/5);
- XsMult(bpi, 16, bpi); // bpi *= 16;
- bpi2 = Batan2(1, 239); // bpi2 = atan(1/239);
- XsMult(bpi2, 4, bpi2); // bpi2 *= 4;
- XXSub(bpi, bpi2, bpi); // bpi -= bpi2;
- return bpi;
- }
sxcbmpi.cpp : last modifiled at 2016/09/04 14:21:44(470 bytes)
created at 2015/12/22 16:09:56
The creation time of this html file is 2017/10/27 15:45:59 (Fri Oct 27 15:45:59 2017).